package jhlee42;

import java.util.Scanner;

public class J10Return {
	//return 문을 사용하는 method
	public static void main(String[] args) {
		
		int x;
		int y;
		int sum = 0,minus = 0,multiple = 0,divide = 0;
		
		Scanner sc;
		sc = new Scanner(System.in);;
		System.out.println("x,y 값을 입력하세요");
		x = sc.nextInt();
		y = sc.nextInt();

		// 메서드가 return 한 결과 값을 변수에 저장
		sum = getSum(x, y);
		minus = getMinus(x, y);
		multiple = getMultiple(x, y);
		divide = getDivide(x, y);
		
		System.out.println("------------------");
		System.out.println(x);
		System.out.println(y);
		System.out.println(sum);
		System.out.println(minus);
		System.out.println(multiple);
		System.out.println(divide);
	}
	public static int getSum(int x, int y){return x + y;}
	public static int getMinus(int x, int y){return x - y;}
	public static int getMultiple(int x, int y){return  x * y;}
	public static int getDivide(int x, int y){return x / y;}
}
